<?php
namespace app\common\model;


use think\Model;
use think\facade\Request;

class Temp extends Model
{
    protected $pk = 'id';
    protected $table = 'qi_temp';

    protected $autoWriteTimestamp = true;
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

    protected $dataFormat = 'Y-m-d H:i:s';


    public function getPageList($map,$pageSize=10)
    {
        $list = Temp::where($map)->order('id','desc')->paginate($pageSize,false,['query'=>Request::param()]);
        return $list;
    }
}